﻿using System;
using System.Linq.Expressions;
using System.Collections.Generic;

namespace NMA.Domain.Model.Service.Application
{
    using NMA.Domain.Model.DTO;
    using NMA.Domain.Shared.Paging;

    public interface INewsFacade : IFacade
    {
        // news's area    
        IEnumerable<NewsDTO> AllNews();
        NewsDTO GetNewsById(Guid id);
        Guid AddNews(NewsDTO dto);
        void RemoveNews(Guid id);
        void RemoveNews(NewsDTO dto);
        void UpdateNews(NewsDTO dto);
        int CountAllNews();
        int GetNumberOfView(Guid id);
        IEnumerable<NewsDTO> GetNewsBy(Expression<Func<NewsDTO, bool>> condition, Type identifyColumn);
        IPagedList<NewsDTO> AllNews(int pageIndex, int pageSize);

        // poll's area
        IEnumerable<PollDTO> AllPoll();
        int CountAllPoll();
        PollDTO GetPollById(Guid id);
        Guid AddPoll(Guid newsId, PollDTO dto);
        void RemovePoll(PollDTO dto);
        void UpdatePoll(PollDTO dto);
        IEnumerable<PollDTO> GetPollBy(Expression<Func<PollDTO, bool>> condition, Type identifyColumn);
        IPagedList<PollDTO> AllPoll(int pageIndex, int pageSize);
    }
}